#include "MaterialDlg.h"
#include "ui_MaterialDlg.h"

MaterialDlg::MaterialDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MaterialDlg)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_DeleteOnClose);

    connect(ui->materialForm,
            SIGNAL(materialChanged(const Material&)),
            SIGNAL(materialChanged(const Material&)));
}

MaterialDlg::~MaterialDlg()
{
    delete ui;
}

void MaterialDlg::initMaterial(const Material& material)
{
    ui->materialForm->initMaterial(material);
}
